--[[
@classmod Marker
General map annotation, exported in a .map file
]]

return pl.class {
	_name = "Marker",
	_init = function (self, name, x, y, color)
		self.name, self.x, self.y, self.color = name, x, y, color
		self.show = {text = true, outline = true}
	end,
	
	update = function (self)
		
	end,
	
	get_name = function (self)
		return string.match(self.name, "(%a+)%(*(%d*)%)*")
	end,
	
	draw = function (self)
			love.graphics.setColor(1, 1, 1)
		if self.show.outline then
			love.graphics.setColor(.5, 1, 1)
			love.graphics.rectangle('line', self.x, self.y, 8,8)
		end
		if self.show.text == true then
			love.graphics.setColor(1, 1, 1)
			love.graphics.print(self.name, self.x, self.y-2, 0, .15, .15)
		end
	end,
	
	get_position = function (self)
		return self.x, self.y
	end,
}
